<template>
  <div class="hello">
    <ul>
      <li v-for="user in userList">
        <router-link :to="{ path: '/user/'+user.id }">
          <span>{{user.id}}、</span>
          <span>{{user.name}}</span>
        </router-link>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {
      title: "用户列表",
      userList: [
        { id: "1", name: "第一条列表项目" },
        { id: "2", name: "第二条列表项目" }
      ]
    };
  }
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
</style>
